using System;
using System.IO;
using System.ServiceModel;

namespace HelloShared
{
    /// <summary>
    /// This is used to show how a configuration file with multimedia
    /// settings (MTOM) enables large files to be sent via WCF
    /// </summary>
    [MessageContract]
    public class FieldEditMessage
    {
        #region Properties

        [MessageHeader(MustUnderstand = true)]
        public Guid PackageId { get; set; }

        [MessageHeader(MustUnderstand = true)]
        public string FileName { get; set; }

        [MessageBodyMember(Order = 1)]
        public Stream UpdatePackage { get; set; }

        #endregion

        #region Constructors

        public FieldEditMessage()
        {
        }

        public FieldEditMessage(Guid packageId, string fileName, Stream updatePackage)
        {
            this.PackageId = packageId;
            this.FileName = fileName;
            this.UpdatePackage = updatePackage;
        }

        #endregion
    }
}